package com.todo.biz.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * @author azhebuxing
 * @date 2024/12/13 21:16
 * @description
 */
@Getter
@AllArgsConstructor
public enum DetectionType {

    IMG_BASE_LINE("IMG_BASE_LINE", "图片基础检测"),
    TEXT_BASE_LINE("TEXT_BASE_LINE", "内容基础检测"),
    COMMENT("COMMENT", "评论内容基础检测"),

    ;

    private static Map<String, DetectionType> codeMap = Arrays.stream(DetectionType.values()).collect(Collectors.toMap(DetectionType::getCode, e -> e));


    private String code;

    private String desc;

    public static DetectionType getByCode(String code) {
        return codeMap.get(code);
    }
}
